import Layout from '@/views/layout'

export default {
  path: '/member',
  name: 'memberCenter',
  component: Layout,
  redirect: '/member/manage',
  meta: {
    title: '会员中心',
    icon: 'nested',
    perm: 'm:member',
    sort: 1
  },
  children: [
    {
      path: '/member/manage',
      name: 'memberManage',
      component: () => import('@/views/common/index'),
      redirect: '/member/manage/list',
      meta: {
        title: '会员管理',
        icon: 'nested',
        perm: 'm:member:manage'
      },
      children: [
        {
          path: '/member/manage/list',
          name: 'memberList',
          component: () => import('@/views/member/manage/list'),
          meta: {
            title: '会员列表',
            icon: 'table',
            perm: 'm:member:manage:list'
          }
        },
        {
          path: '/member/manage/audit',
          name: 'memberAudit',
          component: () => import('@/views/member/manage/audit'),
          meta: {
            title: '会员审核',
            icon: 'table',
            perm: 'm:member:manage:audit'
          }
        },
        {
          path: '/member/manage/account',
          name: 'memberAccount',
          component: () => import('@/views/member/manage/account'),
          meta: {
            title: '账户管理',
            icon: 'table',
            perm: 'm:member:manage:account'
          }
        },
        {
          path: '/member/manage/cancel',
          name: 'memberCancel',
          component: () => import('@/views/member/manage/cancel'),
          meta: {
            title: '订单取消列表',
            icon: 'table',
            perm: 'm:member:manage:cancel'
          }
        },
        {
          path: '/member/manage/audit-detail/:id?',
          name: 'memberDetail',
          hidden: true,
          component: () => import('@/views/member/manage/audit-detail'),
          meta: {
            title: '审核会员信息',
            noCache: true,
            activeMenu: '/member/manage/audit',
            perm: 'm:member:manage:audit-detail'
          }
        }
      ]
    },
    {
      path: '/member/company',
      name: 'memberCompany',
      component: () => import('@/views/common/index'),
      redirect: '/member/company/list',
      meta: {
        title: '企业管理',
        icon: 'nested',
        perm: 'm:member:company'
      },
      children: [
        {
          path: '/member/company/list',
          name: 'companyList',
          component: () => import('@/views/member/company/list'),
          meta: {
            title: '企业列表',
            icon: 'table',
            perm: 'm:member:company:list'
          }
        },
        {
          path: '/member/company/detail/:id?',
          name: 'companyDetail',
          hidden: true,
          component: () => import('@/views/member/company/detail'),
          meta: {
            title: '企业信息',
            icon: 'table',
            activeMenu: '/member/company/list',
            perm: 'm:member:company:detail'
          }
        }
      ]
    }
  ]
}
